package com.jiutong.dao.jiutong;

import com.jiutong.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * Created by sty on 2017/2/23.
 */
public interface ProductMapper {
    @Select("select * from product where id = #{id}")
    Product findById(@Param("id") int id);

    @Update("insert into product(uid,productName) values(#{uid},#{productName})")
    int save(@Param("uid") int uid,@Param("productName") String productName);
}
